import java.util.Scanner;

public class test {

    public static int Sun(int n){
        if(n==1){
            return 1;
        }
        return n+Sun(n-1);
    }

    public static void main(String[] args) {
        int n=4;
        int ret=Sun(n);
        System.out.println(ret);
    }
    public static void func(int n){
        if(n>0&&n<10){
            System.out.println(n);
            return;
        }
        int tmp=n%10;
        func(n/10);
        System.out.println(tmp);

    }

    public static void main4(String[] args) {
        int n=1234;
        func(n);
    }

    public static int f(int n){
        int f1=1;
        int f2=1;
        int f3=f1+f2;
        for (int i = 3; i <n ; i+=2) {
            f1=f2+f3;
            f2=f3+f1;
            f3=f1+f2;
        }
        return f1;
    }

    public static void main3(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        if(n==1||n==2){
            System.out.println("1");
        }
        else{
            int ret=f(n);
            System.out.println(ret);
        }

    }

    public static int test1(int n){
        int tmp=1;
        for (int i = 1; i <=n; i++) {
            tmp*=i;
        }
        return tmp;
    }

    public static void main2(String[] args) {
        Scanner scan=new Scanner((System.in));
        int n=scan.nextInt();
        int ret=test1(n);
        System.out.println(ret);
    }

    public static int max2(int x,int y){
        return (x>=y?x:y);
    }

    public static int max3(int x,int y,int z){
        int ret=max2(x,y);
        return (ret>=z?ret:z);
    }

    public static void main1(String[] args) {
        Scanner scan=new Scanner(System.in);
        int i=scan.nextInt();
        int j=scan.nextInt();
        int ret=max2(i,j);
        System.out.println(ret);
        int k=scan.nextInt();
        int ret2=max3(i,j,k);
        System.out.println(ret2);
    }
}
